package com.lhkj.ct.meta.modules.patient.model.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.lhkj.ct.base.enums.DeleteStatus;
import com.lhkj.ct.base.enums.GlobalStatus;
import com.lhkj.ct.base.mybatis.IBaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * <p>
 * 档案表
 * </p>
 *
 * @author jobob
 * @since 2023-09-17
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="TblPatient对象", description="档案表")
public class TblPatient implements IBaseEntity<String> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "档案id")
    private String id;

    @ApiModelProperty(value = "头像")
    private String patAvatar;

    @ApiModelProperty(value = "姓名")
    private String patName;

    @ApiModelProperty(value = "账号", hidden = true)
    @JsonIgnore
    private String account;

    @ApiModelProperty(value = "密码", hidden = true)
    @JsonIgnore
    private String password;

    @ApiModelProperty(value = "性别")
    private String patSex;

    @ApiModelProperty(value = "证件类型")
    private String patIdentType;

    @ApiModelProperty(value = "证件号码")
//    @TableField(typeHandler = DataEncryptHandler.class)
    private String patIdentNo;

    @ApiModelProperty(value = "出生日期")
    private LocalDate patBirthday;

    @ApiModelProperty(value = "国籍")
    private String patNationality;

    @ApiModelProperty(value = "民族")
    private String patNation;

    @ApiModelProperty(value = "籍贯")
    private String patNativePlace;

    @ApiModelProperty(value = "地址")
    private String patAddress;

    @ApiModelProperty(value = "邮箱")
    private String patEmail;

    @ApiModelProperty(value = "手机号")
    private String patMobile;

    @ApiModelProperty(value = "婚姻状况")
    private String patMarriage;

    @ApiModelProperty(value = "职业")
    private String patJob;

    @ApiModelProperty(value = "学历")
    private String patEducation;

    @ApiModelProperty(value = "所属单位")
    private String patUnit;

    @ApiModelProperty(value = "所属机构")
    private String patOrgan;

    @ApiModelProperty(value = "门诊/诊疗(卡)号")
    private String patCardNo;

    @ApiModelProperty(value = "住院号")
    private String patInNo;

    @ApiModelProperty(value = "体检标识")
    private String patPesNo;

    @ApiModelProperty(value = "状态 0.正常 1.禁用")
    private GlobalStatus status;

    @ApiModelProperty(value = "创建人")
    private String createBy;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(value = "删除标记")
    private DeleteStatus delFlag;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "修改人")
    private String updateBy;

    @TableField(fill = FieldFill.UPDATE)
    @ApiModelProperty(value = "修改时间")
    private LocalDateTime updateTime;

    @TableField(exist = false)
    @ApiModelProperty(value = "年龄", hidden = true)
    private String patAge;

//    @TableField(exist = false)
//    @ApiModelProperty(value = "性别名称", hidden = true)
//    private String patSexName;

}
